package com.huawei.hwclouds.lubanops.demo.test;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

import com.huawei.hwclouds.lubanops.demo.cache.biz.RedisCacheServiceApp;
import com.huawei.hwclouds.lubanops.demo.cache.biz.service.Cache;

@RunWith(SpringRunner.class)
@SpringBootTest(classes = RedisCacheServiceApp.class)
public class RedisServiceTest {
    @Autowired
    private Cache<String> cache;

    @Test
    public void test() {
        cache.set("key2", "hello");
        String key2 = cache.get("key2");
    }

    public void run() {
        int a = 0;
        add(a);
    }

    public void add(int a) {
        a++;
    }

}





